/**
	@file
	Contains physical drives IO functions.
	IO functions allow binary access to physical drives using LBA addressing.
	Read/Write functions returns diskResult struct containing errorCode (not only) (error codes
	are defined below).
	For IO functions operating with partitions see \ref partitioning.h, \ref partitioning.c.

	@warning \ref diskRead and \ref diskWrite function should be changed according to the storage type used.
	@note Now those functions are operating with image file. (For debugging)
	@author Konstantin Kastanov
*/
#ifndef DISKIO_H
#define DISKIO_H

#include "../../tools/headers/common.h"

#define SECTOR_SIZE 512  /**< Size of the storage sector. 
							\todo dynamically read sector size from drive boot sector */
#define MAX_DRIVE_NUMBER 4 /**< Maximum number of physical drives allowed */

extern u32int diskRead(
				u8int drive,          /* Physical drive number */
				u8int* buffer,        /* Pointer to the read data buffer */
				u32int sectorNumber,  /* Start sector number */
				u32int sectorCount     /* Number of sectors to read */
			);   //Return number of actually read bytes
extern u32int diskWrite(
				  u8int drive,          /* Physical drive number */
				  const u8int* buffer,  /* Pointer to the write data (may be non aligned) */
				  u32int sectorNumber,  /* Sector number to write */
				  u32int sectorCount     /* Number of sectors to write */
				);  //Return number of actually written bytes



#endif